<?php /* Smarty version 2.6.19, created on 2014-12-08 06:48:25
         compiled from list.html */ ?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>上传</title>
</head>
<style type="text/css">
  *{margin:0;padding: 0;list-style-type: none;font-family: 'Microsoft Yahei';}
  .main{width: 50%;height: 500px;margin-top:100px;padding-left: 50px;}
  .main ul li{height: 40px;border-bottom: 1px solid #ccc;line-height: 40px;color: #999}
  .main ul li:hover{background-color: #efefef;cursor: pointer;}
  .main ul li span{min-width: 40px;}
  .main ul li span.num{display: inline-block; width: 40px;text-align: center;}
  .main ul li span.name{display: inline-block; width: 100px;text-align: left;}
  .main ul li span.edit{display: inline-block;width: 100px;text-align: center;}
  .main ul li span.edit a{font-size: 14px;color: #999;text-decoration: none}
  .main ul li span.edit a:hover{color:#3385FF }
</style>
<body>

    <div class="main">
    	<ul>
    		<?php $_from = $this->_tpl_vars['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
    		<li>
    			<span class="num"></span>
    			<span class="name"><?php echo $this->_tpl_vars['item'][1]; ?>
</span>
          <span class="path"><?php echo $this->_tpl_vars['item'][2]; ?>
</span>
          <span class="edit">
            <a href="">编辑</a>  
            <a href="index.php?action=del&&id=<?php echo $this->_tpl_vars['item'][0]; ?>
">删除</a>
          </span>
    		</li>
    		<?php endforeach; endif; unset($_from); ?>
    	</ul>
    </div>
</body>
<script type="text/javascript">
   var nums=document.getElementsByTagName("span");  
   var arr=[];
   for (var i = nums.length - 1; i >= 0; i--) {
        nums[i].className=="num"? arr.push(nums[i]):null;       
   };
   for (var i = 0; i <arr.length; i++) {
        arr[i].innerHTML=arr.length-i;
   };
   

</script>
</html>